   1              		.syntax unified
   2              		.cpu cortex-m3
   3              		.fpu softvfp
   4              		.eabi_attribute 20, 1
   5              		.eabi_attribute 21, 1
   6              		.eabi_attribute 23, 3
   7              		.eabi_attribute 24, 1
   8              		.eabi_attribute 25, 1
   9              		.eabi_attribute 26, 1
  10              		.eabi_attribute 30, 4
  11              		.eabi_attribute 34, 1
  12              		.eabi_attribute 18, 4
  13              		.thumb
  14              		.syntax unified
  15              		.file	"main.c"
  16              		.text
  17              	.Ltext0:
  18              		.cfi_sections	.debug_frame
  19              		.section	.text.showVicError,"ax",%progbits
  20              		.align	1
  21              		.thumb
  22              		.thumb_func
  24              	showVicError:
  25              	.LFB0:
  26              		.file 1 "main.c"
   1:main.c        **** #include "vic.h"
   2:main.c        **** #include "app.h"
   3:main.c        **** #include "uart0_irq.h"
   4:main.c        **** 
   5:main.c        **** static void showVicError(int n) {
  27              		.loc 1 5 0
  28              		.cfi_startproc
  29              		@ Volatile: function does not return.
  30              		@ args = 0, pretend = 0, frame = 0
  31              		@ frame_needed = 0, uses_anonymous_args = 0
  32              	.LVL0:
  33 0000 2DE98848 		push	{r3, r7, fp, lr}
  34              	.LCFI0:
  35              		.cfi_def_cfa_offset 16
  36              		.cfi_offset 3, -16
  37              		.cfi_offset 7, -12
  38              		.cfi_offset 11, -8
  39              		.cfi_offset 14, -4
   6:main.c        **** 	irq_Disable();
  40              		.loc 1 6 0
  41              		.syntax unified
  42              	@ 6 "main.c" 1
  43 0004 72B6     		cpsid i
  44              	@ 0 "" 2
  45              		.thumb
  46              		.syntax unified
  47 0006 0A28     		cmp	r0, #10
  48 0008 A8BF     		it	ge
  49 000a 0A20     		movge	r0, #10
  50              	.LVL1:
  51 000c 0446     		mov	r4, r0
   7:main.c        **** 
   8:main.c        **** 	static int x;
   9:main.c        **** 	if (n>10) n=10;
  10:main.c        **** 	while(1) {
  11:main.c        **** 		for (x=0;x<n;x++) {
  52              		.loc 1 11 0
  53 000e 144D     		ldr	r5, .L7
  12:main.c        **** 			ledERROR_On();	buzzer_On();	delay_ms(250);
  54              		.loc 1 12 0
  55 0010 DFF85C90 		ldr	r9, .L7+16
  11:main.c        **** 			ledERROR_On();	buzzer_On();	delay_ms(250);
  56              		.loc 1 11 0
  57 0014 4FF00008 		mov	r8, #0
  58              	.LVL2:
  59              	.L4:
  60 0018 DFF844A0 		ldr	r10, .L7
  61              		.loc 1 12 0
  62 001c DFF854B0 		ldr	fp, .L7+20
  11:main.c        **** 			ledERROR_On();	buzzer_On();	delay_ms(250);
  63              		.loc 1 11 0
  64 0020 C5F80080 		str	r8, [r5]
  65              	.L2:
  11:main.c        **** 			ledERROR_On();	buzzer_On();	delay_ms(250);
  66              		.loc 1 11 0 is_stmt 0 discriminator 1
  67 0024 DAF80030 		ldr	r3, [r10]
  68 0028 9C42     		cmp	r4, r3
  69 002a 15DD     		ble	.L6
  70              		.loc 1 12 0 is_stmt 1 discriminator 3
  71 002c 4FF00057 		mov	r7, #536870912
  72 0030 4FF48006 		mov	r6, #4194304
  73 0034 C9F80070 		str	r7, [r9]
  74 0038 0A48     		ldr	r0, .L7+4
  75 003a CBF80060 		str	r6, [fp]
  76 003e FFF7FEFF 		bl	delay
  77              	.LVL3:
  13:main.c        **** 			ledERROR_Off();	buzzer_Off();	delay_ms(250);
  78              		.loc 1 13 0 discriminator 3
  79 0042 094B     		ldr	r3, .L7+8
  80 0044 0748     		ldr	r0, .L7+4
  81 0046 1F60     		str	r7, [r3]
  82 0048 43F8806C 		str	r6, [r3, #-128]
  83 004c FFF7FEFF 		bl	delay
  84              	.LVL4:
  11:main.c        **** 			ledERROR_On();	buzzer_On();	delay_ms(250);
  85              		.loc 1 11 0 discriminator 3
  86 0050 2B68     		ldr	r3, [r5]
  87 0052 0133     		adds	r3, r3, #1
  88 0054 2B60     		str	r3, [r5]
  89 0056 E5E7     		b	.L2
  90              	.L6:
  14:main.c        **** 		}
  15:main.c        **** 		delay_ms(1000);
  91              		.loc 1 15 0
  92 0058 0448     		ldr	r0, .L7+12
  93 005a FFF7FEFF 		bl	delay
  94              	.LVL5:
  16:main.c        **** 	}
  95              		.loc 1 16 0
  96 005e DBE7     		b	.L4
  97              	.L8:
  98              		.align	2
  99              	.L7:
 100 0060 00000000 		.word	.LANCHOR0
 101 0064 C8267F00 		.word	8333000
 102 0068 9CC00920 		.word	537510044
 103 006c 089FFC01 		.word	33333000
 104 0070 98C00920 		.word	537510040
 105 0074 18C00920 		.word	537509912
 106              		.cfi_endproc
 107              	.LFE0:
 109              		.section	.text.startup.main,"ax",%progbits
 110              		.align	1
 111              		.global	main
 112              		.thumb
 113              		.thumb_func
 115              	main:
 116              	.LFB1:
  17:main.c        **** }
  18:main.c        **** 
  19:main.c        **** int main(void) {
 117              		.loc 1 19 0
 118              		.cfi_startproc
 119              		@ Volatile: function does not return.
 120              		@ args = 0, pretend = 0, frame = 0
 121              		@ frame_needed = 0, uses_anonymous_args = 0
 122 0000 08B5     		push	{r3, lr}
 123              	.LCFI1:
 124              		.cfi_def_cfa_offset 8
 125              		.cfi_offset 3, -8
 126              		.cfi_offset 14, -4
  20:main.c        **** 	nvic_SetIntHandler(showVicError);
 127              		.loc 1 20 0
 128 0002 2048     		ldr	r0, .L11
 129 0004 FFF7FEFF 		bl	nvic_SetIntHandler
 130              	.LVL6:
  21:main.c        **** 
  22:main.c        **** 	// NÃO USAR UART COM INTERRUPÇÃO PARA O LOG, POIS CONSTANTEMENTE A
  23:main.c        ****   	// POSIÇÃO DOS VETORES DE INTERRUPÇÕES COM O USO DO BOOTLOADER
  24:main.c        **** 
  25:main.c        ****   	// REGISTRANDO AS ENTRADAS E SAÍDAS PADRÃO AOS SEUS RESPECTIVOS DISPOSTIVOS
  26:main.c        **** 	// PORTA PARA CLI DEVE SER COM INTERRUPÇÃO
  27:main.c        ****   	lgetchar_RegisterDev(uart0_GetChar);
 131              		.loc 1 27 0
 132 0008 1F48     		ldr	r0, .L11+4
 133 000a FFF7FEFF 		bl	lgetchar_RegisterDev
 134              	.LVL7:
  28:main.c        **** 	lputchar_RegisterDev(uart0_PutChar);
 135              		.loc 1 28 0
 136 000e 1F48     		ldr	r0, .L11+8
 137 0010 FFF7FEFF 		bl	lputchar_RegisterDev
 138              	.LVL8:
  29:main.c        **** 	ldebug_RegisterDev(uart0_BasicPutChar);
 139              		.loc 1 29 0
 140 0014 1E48     		ldr	r0, .L11+12
 141 0016 FFF7FEFF 		bl	ldebug_RegisterDev
 142              	.LVL9:
  30:main.c        **** 	uart0_Init(115200);
 143              		.loc 1 30 0
 144 001a 4FF4E130 		mov	r0, #115200
 145 001e FFF7FEFF 		bl	uart0_Init
 146              	.LVL10:
  31:main.c        **** 
  32:main.c        **** 	systime_Init();
 147              		.loc 1 32 0
 148 0022 FFF7FEFF 		bl	systime_Init
 149              	.LVL11:
  33:main.c        **** 	systime_SetIntHandler(app_Tick, 1); // Chamar o a função callsystem a cada 1ms OBS: Levando em con
 150              		.loc 1 33 0
 151 0026 0121     		movs	r1, #1
 152 0028 1A48     		ldr	r0, .L11+16
 153 002a FFF7FEFF 		bl	systime_SetIntHandler
 154              	.LVL12:
  34:main.c        **** 	ledError_Init();
 155              		.loc 1 34 0
 156 002e FFF7FEFF 		bl	ledError_Init
 157              	.LVL13:
  35:main.c        **** 	beep_Init();
 158              		.loc 1 35 0
 159 0032 FFF7FEFF 		bl	beep_Init
 160              	.LVL14:
  36:main.c        **** 	gKey_Init(onKeyDown, &onKeyPress, &onKeyUp);	// Anexar os eventos do teclado
 161              		.loc 1 36 0
 162 0036 184A     		ldr	r2, .L11+20
 163 0038 1849     		ldr	r1, .L11+24
 164 003a 1948     		ldr	r0, .L11+28
 165 003c FFF7FEFF 		bl	gKey_Init
 166              	.LVL15:
  37:main.c        **** 
  38:main.c        **** 	ssp1_Init(SSP0_MASTER, SSP0_STANDARD); // inicar o barramento SPI a 400Khz
 167              		.loc 1 38 0
 168 0040 0721     		movs	r1, #7
 169 0042 0020     		movs	r0, #0
 170 0044 FFF7FEFF 		bl	ssp1_Init
 171              	.LVL16:
  39:main.c        **** 	ssp1_SetClockFreq (10000000); // 10MHz
 172              		.loc 1 39 0
 173 0048 1648     		ldr	r0, .L11+32
 174 004a FFF7FEFF 		bl	ssp1_SetClockFreq
 175              	.LVL17:
  40:main.c        **** 	max7219_Init(4); // tem que ser depois de inicializar o SPI
 176              		.loc 1 40 0
 177 004e 0420     		movs	r0, #4
 178 0050 FFF7FEFF 		bl	max7219_Init
 179              	.LVL18:
  41:main.c        **** 
  42:main.c        **** 	irq_Enable(); 	// Habilitar interrupções
 180              		.loc 1 42 0
 181              		.syntax unified
 182              	@ 42 "main.c" 1
 183 0054 62B6     		cpsie i
 184              	@ 0 "" 2
  43:main.c        **** 	app_Init();
 185              		.loc 1 43 0
 186              		.thumb
 187              		.syntax unified
 188 0056 FFF7FEFF 		bl	app_Init
 189              	.LVL19:
  44:main.c        **** 
  45:main.c        **** 	lprintf(CMD_TERMINATOR);
 190              		.loc 1 45 0
 191 005a 1349     		ldr	r1, .L11+36
 192 005c 0120     		movs	r0, #1
 193 005e FFF7FEFF 		bl	rprintf
 194              	.LVL20:
  46:main.c        **** 	lprintf(PROGAM_NAME);
 195              		.loc 1 46 0
 196 0062 1249     		ldr	r1, .L11+40
 197 0064 0120     		movs	r0, #1
 198 0066 FFF7FEFF 		bl	rprintf
 199              	.LVL21:
  47:main.c        **** 	lprintf("ucLibc version "__VERSION CMD_TERMINATOR);
 200              		.loc 1 47 0
 201 006a 1149     		ldr	r1, .L11+44
 202 006c 0120     		movs	r0, #1
 203 006e FFF7FEFF 		bl	rprintf
 204              	.LVL22:
  48:main.c        **** 
  49:main.c        **** 	while (1) {
  50:main.c        **** 		prompt_Process();
  51:main.c        **** 		app_Process();
  52:main.c        **** 		gKey_Process(control.key); // se há tecla pressiona o processo vai chamar os onKeyXXXX
 205              		.loc 1 52 0
 206 0072 104C     		ldr	r4, .L11+48
 207              	.L10:
  50:main.c        **** 		app_Process();
 208              		.loc 1 50 0 discriminator 1
 209 0074 FFF7FEFF 		bl	prompt_Process
 210              	.LVL23:
  51:main.c        **** 		gKey_Process(control.key); // se há tecla pressiona o processo vai chamar os onKeyXXXX
 211              		.loc 1 51 0 discriminator 1
 212 0078 FFF7FEFF 		bl	app_Process
 213              	.LVL24:
 214              		.loc 1 52 0 discriminator 1
 215 007c 2079     		ldrb	r0, [r4, #4]	@ zero_extendqisi2
 216 007e FFF7FEFF 		bl	gKey_Process
 217              	.LVL25:
 218 0082 F7E7     		b	.L10
 219              	.L12:
 220              		.align	2
 221              	.L11:
 222 0084 00000000 		.word	showVicError
 223 0088 00000000 		.word	uart0_GetChar
 224 008c 00000000 		.word	uart0_PutChar
 225 0090 00000000 		.word	uart0_BasicPutChar
 226 0094 00000000 		.word	app_Tick
 227 0098 00000000 		.word	onKeyUp
 228 009c 00000000 		.word	onKeyPress
 229 00a0 00000000 		.word	onKeyDown
 230 00a4 80969800 		.word	10000000
 231 00a8 00000000 		.word	.LC0
 232 00ac 02000000 		.word	.LC1
 233 00b0 42000000 		.word	.LC2
 234 00b4 00000000 		.word	control
 235              		.cfi_endproc
 236              	.LFE1:
 238              		.comm	control,24,4
 239              		.section	.rodata.str1.1,"aMS",%progbits,1
 240              	.LC0:
 241 0000 0A00     		.ascii	"\012\000"
 242              	.LC1:
 243 0002 6578616D 		.ascii	"examples hr01 firmware v1.0 [compiled in Jun  6 201"
 243      706C6573 
 243      20687230 
 243      31206669 
 243      726D7761 
 244 0035 37203134 		.ascii	"7 14:04:49]\012\000"
 244      3A30343A 
 244      34395D0A 
 244      00
 245              	.LC2:
 246 0042 75634C69 		.ascii	"ucLibc version 2.8\012\000"
 246      62632076 
 246      65727369 
 246      6F6E2032 
 246      2E380A00 
 247              		.section	.bss.x.4877,"aw",%nobits
 248              		.align	2
 249              		.set	.LANCHOR0,. + 0
 252              	x.4877:
 253 0000 00000000 		.space	4
 254              		.text
 255              	.Letext0:
 256              		.file 2 "uc_libc_dev/_libdef/uc_libdefs.h"
 257              		.file 3 "app.h"
 258              		.file 4 "uc_libc_dev/_arch/arm_lpc/timer/delay.h"
 259              		.file 5 "uc_libc_dev/_arch/arm_lpc/common/vic_cortexm3.h"
 260              		.file 6 "uc_libc_dev/stdio/stdio_uc.h"
 261              		.file 7 "uc_libc_dev/_arch/arm_lpc/uart/uart0_irq.h"
 262              		.file 8 "uc_libc_dev/_arch/arm_lpc/timer/systick.h"
 263              		.file 9 "uc_libc_dev/misc/led_error.h"
 264              		.file 10 "uc_libc_dev/sound/beep/beep.h"
 265              		.file 11 "uc_libc_dev/keyboard/gkey.h"
 266              		.file 12 "uc_libc_dev/_arch/arm_lpc/spi/ssp1.h"
 267              		.file 13 "uc_libc_dev/display/max7219_dot_matrix.h"
DEFINED SYMBOLS
                            *ABS*:00000000 main.c
D:\_temp\_windows\cc71EuOv.s:20     .text.showVicError:00000000 $t
D:\_temp\_windows\cc71EuOv.s:24     .text.showVicError:00000000 showVicError
D:\_temp\_windows\cc71EuOv.s:100    .text.showVicError:00000060 $d
D:\_temp\_windows\cc71EuOv.s:110    .text.startup.main:00000000 $t
D:\_temp\_windows\cc71EuOv.s:115    .text.startup.main:00000000 main
D:\_temp\_windows\cc71EuOv.s:222    .text.startup.main:00000084 $d
                            *COM*:00000018 control
D:\_temp\_windows\cc71EuOv.s:248    .bss.x.4877:00000000 $d
D:\_temp\_windows\cc71EuOv.s:252    .bss.x.4877:00000000 x.4877
                     .debug_frame:00000010 $d

UNDEFINED SYMBOLS
delay
nvic_SetIntHandler
lgetchar_RegisterDev
lputchar_RegisterDev
ldebug_RegisterDev
uart0_Init
systime_Init
systime_SetIntHandler
ledError_Init
beep_Init
gKey_Init
ssp1_Init
ssp1_SetClockFreq
max7219_Init
app_Init
rprintf
prompt_Process
app_Process
gKey_Process
uart0_GetChar
uart0_PutChar
uart0_BasicPutChar
app_Tick
onKeyUp
onKeyPress
onKeyDown
